package com.it.cloud.itagent;

import com.sun.net.httpserver.HttpServer;
import java.io.IOException;
import java.net.InetSocketAddress;

/**
 * @author 司马缸砸缸了
 * @date 2019/8/2 10:50
 * @description server
 */
public class HttpServerMain {

    public static void main(String[] args) {
        //允许最大连接数
        int backLog = 100;
        HttpServer server = null;
        try {
            server = com.sun.net.httpserver.HttpServer.create(new InetSocketAddress(8000), backLog);
        } catch (IOException e) {
            e.printStackTrace();
        }

        server.createContext("/test", new JobHandler());
        server.start();
    }



}
